package com.shop.controller;


import com.shop.entity.BulkReturnDetail;
import com.shop.model.PageParam;
import com.shop.model.vo.Rsp;
import com.shop.service.BulkReturnDetailService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Validated
@RestController
@RequestMapping("returnDetail")
@AllArgsConstructor
public class BulkReturnDetailController {
    /**
     * 服务对象
     */
    private final BulkReturnDetailService bulkReturnDetailService;
    /**
     * @author clh
     * @description 分页
     * @date  2020/11/30 19:39
     * @param pageParam
     * @return {@link Rsp}
     **/
    @PostMapping("searchSomeByPageReturnDetail")
    public Rsp searchSomeByPageDetail(@RequestBody PageParam<BulkReturnDetail> pageParam){
        System.out.println(pageParam.getModel());

        return Rsp.success(bulkReturnDetailService.searchSomeByPageDetail(pageParam));
    }
}
